-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OH2-433 | Implement token refresh #695
OH2-433 | Implement token refresh #695
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use setInterval
to check every 5 seconds if the token has expired and refresh isn't the most efficient way to achieve token refresh. I would opt for checking the token expiration when a request is sent (if we received a 401, for example) and try to refresh the token.
With the current implementation, token and token refresh will never expired as long as the OH tab in the browser is open, even the user does nothing.
Hi guys, ready to be merged? How can I test it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and approved by @SilverD3
See OH2-433